#pragma once

#include "../radar.h"
#include "NavRadarProtocol.h"
#include "NavRadarSpoke.h"
#include "../common/timercpp.h"

class SimRadar : public Radar
{
public:
    SimRadar(boost::asio::io_service& io_service);
    ~SimRadar();

    virtual bool do_video_processer(const char *data, unsigned int length);
    virtual void do_status_processer(const char *data, unsigned int length, unsigned int radar_key = 0);
    virtual void StartOwnProcess();
    virtual void Stop();
    void SendCmd(const std::string &data);

private:
    void onRadarSpokeData(const Navico::Protocol::NRP::Spoke::t9174Spoke* spoke);
    void queryAll();

    void processCompassData(const Navico::Protocol::NRP::Spoke::t9174Spoke* spoke);

    Timer m_query_timer;
};